import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/list_app_article_basic_entity.dart';

ListAppArticleBasicEntity $ListAppArticleBasicEntityFromJson(Map<String, dynamic> json) {
	final ListAppArticleBasicEntity listAppArticleBasicEntity = ListAppArticleBasicEntity();
	final List<ListAppArticleBasicContent>? content = jsonConvert.convertListNotNull<ListAppArticleBasicContent>(json['content']);
	if (content != null) {
		listAppArticleBasicEntity.content = content;
	}
	final int? pageNum = jsonConvert.convert<int>(json['pageNum']);
	if (pageNum != null) {
		listAppArticleBasicEntity.pageNum = pageNum;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		listAppArticleBasicEntity.pageSize = pageSize;
	}
	final int? totalPages = jsonConvert.convert<int>(json['totalPages']);
	if (totalPages != null) {
		listAppArticleBasicEntity.totalPages = totalPages;
	}
	final int? totalSize = jsonConvert.convert<int>(json['totalSize']);
	if (totalSize != null) {
		listAppArticleBasicEntity.totalSize = totalSize;
	}
	return listAppArticleBasicEntity;
}

Map<String, dynamic> $ListAppArticleBasicEntityToJson(ListAppArticleBasicEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['content'] =  entity.content?.map((v) => v.toJson()).toList();
	data['pageNum'] = entity.pageNum;
	data['pageSize'] = entity.pageSize;
	data['totalPages'] = entity.totalPages;
	data['totalSize'] = entity.totalSize;
	return data;
}

ListAppArticleBasicContent $ListAppArticleBasicContentFromJson(Map<String, dynamic> json) {
	final ListAppArticleBasicContent listAppArticleBasicContent = ListAppArticleBasicContent();
	final String? articleType = jsonConvert.convert<String>(json['articleType']);
	if (articleType != null) {
		listAppArticleBasicContent.articleType = articleType;
	}
	final String? contentType = jsonConvert.convert<String>(json['contentType']);
	if (contentType != null) {
		listAppArticleBasicContent.contentType = contentType;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		listAppArticleBasicContent.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		listAppArticleBasicContent.title = title;
	}
	return listAppArticleBasicContent;
}

Map<String, dynamic> $ListAppArticleBasicContentToJson(ListAppArticleBasicContent entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['articleType'] = entity.articleType;
	data['contentType'] = entity.contentType;
	data['id'] = entity.id;
	data['title'] = entity.title;
	return data;
}